test(vexpdif): rewrite pto_vexpdif_fusion as vreg-level pto-test-opt case - #18
Merged
Merged
Conversation
…case The end-to-end ptoas RUN drove the test through TileLib template expansion, where tsub/texp fall back to ordinary PTODSL templates in separate local-boundary loops. The intervening vsts/vlds broke the vsub->vexp SSA chain that PTOVexpdifFusion matches, so the pass never fired and the lit failed on a clean main-llvm19-build checkout. Rewrite the case as hand-written vreg IR exercised via pto-test-opt, the same pattern used by the mask/f16/multiuse siblings. A single-use f32 vsub feeding vexp inside one fusion_region with one shared mask SSA now fuses into pto.vexpdif "ODD" as intended. This decouples the positive f32 fusion case from the ptoas pipeline, TileLib templates, and local-boundary fallback behavior. Drop the second RUN that lowered to LLVM IR; it depended on the full ptoas pipeline and its coverage is already provided by test/lit/vmi_new/vmi_to_vpto_vexpdif_f16.pto and vmi_layout_assignment_vexpdif.pto.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrite
test/lit/tile_fusion/pto_vexpdif_fusion.ptofrom an end-to-end ptoas pipeline test into a hand-written vreg-level case exercised viapto-test-opt -pto-vexpdif-fusion, matching the pattern of themask/f16/multiusesiblings.Problem
On a clean
main-llvm19-buildcheckout (0003225f4),pto_vexpdif_fusion.ptofailed:The end-to-end RUN drove the test through TileLib template expansion, where
tsub/texpfall back to ordinary PTODSL templates in separate local-boundary loops (boundary_reason = "non_vmi_local_boundary_fallback"). The interveningvsts/vldsbroke thevsub -> vexpSSA chain thatPTOVexpdifFusionmatches (exp.getInput().getDefiningOp<VsubOp>()), so the pass never fired.Fix
Rewrite as hand-written vreg IR, decoupled from the ptoas pipeline, TileLib templates, and local-boundary fallback:
vsubsingle-use feedingvexp, sharing one mask SSA inside onefusion_region— exactly the shapecanFuserequires.LLVMRUN line; it depended on the full ptoas pipeline, and vexpdif LLVM lowering is already covered bytest/lit/vmi_new/vmi_to_vpto_vexpdif_f16.ptoandvmi_layout_assignment_vexpdif.pto.Verification
All four vexpdif-fusion lit tests pass on
main-llvm19-build:Scope
Single file, test-only change.